Advanced comment extracting techniques

HTML Tags

In Visual Basic, comments always appear as plain text without any formatting.  Becuase your generated Help is HTML based, you can include standard HTML tags to enhance the formatting of the comments when they are extracted to the HTML Help file.  A couple of examples follow, but your imagination is the limit.

If your HTML tags get too elaborate and your comments become difficult to read, you may want to create a whole seperate HTML page in a tool such as Microsoft Frontpage, include the file in your HTML Help project file (see custom HTML Help project templates) and include a hyperlink to your page using the technique illustrated below.

' In this comment I want to <b>emphasise</b> a word

' In this comment I want to hyperlink to my web site
'  <a ref="www.mycompany.com">Check for updates here</a>

Hyperlinks

Often, in your comments you refer to other objects within your project.  To make you generated help more navigable, you can identify places in your comments that should be presented as a clickable link to another component in the same project.  For example, you have 2 classes in your project, and 'Class1' has a method that accepts an object of type 'Class2'.  You may decide to include a comment describing the method as follows :

' This method performs a transformation on the passed
'  %Class2% object
would result in :
This method performs a transformation on the passed Class2 object
in the generated HTML Help file topic

When your HTML Help file is created, the %Class2% placeholder is converted into a hyperlink to the relevant page describing the Class2 component.

As a further step, you can include a placeholder of the format %Friendly name:Component Name% that allows you to control the text displayed for the generated hyperlink.  An example follows :

' This method performs a transformation on the passed
'  %Class2 (Click here):Class2% object
would result in :
This method performs a transformation on the passed Class2 (Click here) object
in the generated HTML Help file topic.